package cn.online.model;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * Student entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "student", catalog = "online")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Student implements java.io.Serializable {

	// Fields

	private Integer sid;
	private String sname;
	private String spassword;
	private String srealname;
	private String smail;
	

	// Constructors

	/** default constructor */
	public Student() {
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "s_id", unique = true, nullable = false)
	public Integer getSid() {
		return this.sid;
	}

	public void setSid(Integer sid) {
		this.sid = sid;
	}

	@Column(name = "s_name", nullable = false, length = 20)
	public String getSname() {
		return this.sname;
	}

	public void setSname(String sname) {
		this.sname = sname;
	}

	@Column(name = "s_password", nullable = false, length = 20)
	public String getSpassword() {
		return this.spassword;
	}

	public void setSpassword(String spassword) {
		this.spassword = spassword;
	}

	@Column(name = "s_realname", nullable = false, length = 20)
	public String getSrealname() {
		return this.srealname;
	}

	public void setSrealname(String srealname) {
		this.srealname = srealname;
	}

	@Column(name = "s_mail", nullable = false, length = 100)
	public String getSmail() {
		return this.smail;
	}

	public void setSmail(String smail) {
		this.smail = smail;
	}

}